home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / foundation / NSUtilities.h < prev    next >
Text File  |  1994-07-13  |  2KB  |  76 lines

  1. /*    NSUtilities.h
  2.     Utilities of all kind; Garbage sink
  3.       Copyright 1993, 1994, NeXT, Inc.
  4.     NeXT, March 1993
  5. */
  6.  
  7. #import <foundation/NSString.h>
  8. #import <foundation/NSDictionary.h>
  9.  
  10. /***************    Logging        ***************/
  11.  
  12. extern void NSLog(NSString *format, ...);
  13. extern void NSLogv(NSString *format, va_list args);
  14.     /* log message, along with date and process, on stderr;
  15.     An ending \n is added iff none at the end of format; %@ and istrings OK;
  16.     Flushes stderr afterwards */
  17.  
  18. /***************    ASCII PList encoding        ***********/
  19.  
  20. @interface NSString (NSExtendedStringPListParsing)
  21.     
  22. - propertyList;
  23.     /* understands the PropertyList classes (NSString, NSData, NSArray, NSDictionary);
  24.     May raise */
  25.  
  26. - (NSDictionary *)propertyListFromStringsFileFormat;
  27.     /* understands the .strings files;
  28.     Using -propertyList should be preferred for non .strings files.
  29.     May raise */
  30.  
  31. @end
  32.  
  33. @interface NSDictionary (NSExtendedPListASCII)
  34.  
  35. - (NSString *)descriptionInStringsFileFormat;
  36.     /* same format as the .strings files */
  37.  
  38. @end
  39.  
  40. /***********    Abstract class for Enumerators             ***********/
  41.  
  42. @interface NSEnumerator:NSObject
  43.  
  44. - nextObject;
  45.     // returns nil when no more
  46.  
  47. @end
  48.  
  49. /***************    Compatibility with NEXTSTEP 3.0        ***********/
  50.  
  51. #import <objc/Object.h>
  52.  
  53. @interface Object (NSCompatibility)
  54.  
  55. - (BOOL)respondsToSelector:(SEL)sel;
  56. - (BOOL)conformsToProtocol:protocol;
  57. - (BOOL)isKindOfClass:(Class)cls;
  58. - (BOOL)isMemberOfClass:(Class)cls;
  59. - perform:(SEL)sel withObject:object;
  60. - perform:(SEL)sel withObject:object1 withObject:object2;
  61. - retain;
  62. - (unsigned)retainCount;
  63. - (void)release;
  64. - autorelease;
  65. + allocWithZone:(NSZone *)zone;
  66. - copyWithZone:(NSZone *)zone;
  67. - (void)dealloc;
  68. + poseAsClass:(Class)class;
  69. + (BOOL)instancesRespondToSelector:(SEL)sel;
  70. - (IMP)methodForSelector:(SEL)sel;
  71. + (IMP)instanceMethodForSelector:(SEL)sel;
  72. - (void)doesNotRecognizeSelector:(SEL)sel;
  73.  
  74. @end
  75.  
  76.